-- GENERATED SPELL FOR [Pyrewood Sentry] --


function spell0_1894(pUnit, Event) --@Battle Roar,Self--
pUnit:FullCastSpellOnTarget(6507,pUnit)
pUnit:RegisterEvent('Sorts_1894', 0, 1)
end

function spell1_1894(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_1894', 527, 1)
end

function spell2_1894(pUnit, Event) --@Demoralizing Shout,Self--
pUnit:FullCastSpellOnTarget(13730,pUnit)
pUnit:RegisterEvent('Sorts_1894', 30264, 1)
end

function spell3_1894(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1894', 8258, 1)
end

function spell4_1894(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_1894', 5288, 1)
end

function spell5_1894(pUnit, Event) --@Transformation,Self--
pUnit:FullCastSpellOnTarget(7671,pUnit)
pUnit:RegisterEvent('Sorts_1894', 658, 1)
end

function Sorts_1894(pUnit, Event)
local choix_sorts_1894 = math.random(0, 5)
if choix_sorts_1894 == 0 then
pUnit:RegisterEvent('spell0_1894', 1, 1)
end
if choix_sorts_1894 == 1 then
pUnit:RegisterEvent('spell1_1894', 1, 1)
end
if choix_sorts_1894 == 2 then
pUnit:RegisterEvent('spell2_1894', 1, 1)
end
if choix_sorts_1894 == 3 then
pUnit:RegisterEvent('spell3_1894', 1, 1)
end
if choix_sorts_1894 == 4 then
pUnit:RegisterEvent('spell4_1894', 1, 1)
end
if choix_sorts_1894 == 5 then
pUnit:RegisterEvent('spell5_1894', 1, 1)
end
end

function mob1894_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1894', math.random(1500, 3000), 1)
end

function mob1894_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1894_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1894_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1894, 1, 'mob1894_Action')
RegisterUnitEvent(1894, 2, 'mob1894_Leave')
RegisterUnitEvent(1894, 3, 'mob1894_Kill')
RegisterUnitEvent(1894, 4, 'mob1894_Die')
